package com.tpshion.cloud.auth.controller;

import com.tpshion.cloud.auth.domain.entity.Outpath;
import com.tpshion.cloud.auth.mapper.OutpathMapper;
import com.tpshion.cloud.common.support.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OutPathController {

    private static final Logger log = LoggerFactory.getLogger(OutPathController.class);

    @Autowired
    private OutpathMapper outpathMapper;

    @GetMapping("/outpath/{name}")
    public Result<?> getOutPath(@PathVariable("name") String name){
        log.info("*** getOutPath name:{}",name);
        Outpath outpath = outpathMapper.getByName(name);
        log.info("*** outpath:{}",outpath);
        return Result.ok(outpath);
    }
}
